import React, { Component } from 'react';

export class Tabs extends Component {
  render() {
    return (
      <div className="tabs-order">
        {this.props.tabs.map((item) => (
          <div
            className={this.props.active === item.type ? 'on' : ''}
            key={item.id}
            onClick={() => this.props.changeSortType(item.type)}
          >
            按{item.name}排序
          </div>
        ))}
      </div>
    );
  }
}
